property HexadecimalDigits : "0123456789ABCDEF"

on hexadecimal2decimal(hexa)
	set digits to reverse of (items of hexa)
	set decimal to 0
	repeat with i from 1 to length of digits
		set b to 16 ^ (i - 1) as integer
		set digit to (offset of (item i of digits) in HexadecimalDigits) - 1
		set decimal to decimal + (digit * b)
	end repeat
	return decimal
end hexadecimal2decimal

on hexadecimal2binary(hexa)

end